import Vue from 'vue'
import Router from 'vue-router'
// 引入组件
import ButtonNavbar from '../components/ButtonNavbar'
import Login from '../components/Login'
import Home from '../pages/Home'
import Division from '../pages/Division'
import UserManage from '../pages/UserManage'
import HistroyData from '../pages/HistroyData'
import OrdUsers from '../pages/OrdUsers'
import RealTime from '../pages/RealTime'
import Intro from '../pages/Intro'


Vue.use(Router)

export default new Router({
    routes: [{
            path: '/',
            name: 'Login',
            component: Login
        },
        // 暴露路由
        {
            path: '/ButtonNavbar',
            name: 'ButtonNavbar',
            component: ButtonNavbar
        },
        // 主页
        {
            path: '/Home',
            name: 'Home',
            component: Home,
            children: [{
                    // 分工说明
                    path: 'Division',
                    name: 'Division',
                    component: Division
                },
                {
                    // 用户管理
                    path: 'UserManage',
                    name: 'UserManage',
                    component: UserManage,

                },
                {
                    // 历史数据
                    path: 'HistroyData',
                    name: 'HistroyData',
                    component: HistroyData
                },
                {
                    // 普通用户
                    path: 'OrdUsers',
                    name: 'OrdUsers',
                    component: OrdUsers
                },
                {
                    // 实时监控
                    path: 'RealTime',
                    name: 'RealTime',
                    component: RealTime
                },
                {
                    // 介绍
                    path: 'Intro',
                    name: 'Intro',
                    component: Intro
                }
            ]
        },

    ]
})